attach Android Surface
Creates a session that presents the map to an Android window, with a graphics context that the library creates.
A Vulkan build presents with device, or, when device is null, with a device that the library creates. An OpenGL build uses an EGL context on the default display, and device must be null. Attach with RenderDriverKind.CORE_WORKER.
When the platform destroys the window, such as in SurfaceHolder.Callback.surfaceDestroyed, release the target with RenderSessionHandle.releaseTarget(), or give the session a new window with RenderSessionHandle.setAndroidSurfaceTarget(), without waiting for that to complete. The session keeps its own reference to the window and stays usable for the next window. A frame to the destroyed window finishes with RenderResult.TARGET_NOT_READY, or with RenderResult.RENDERED if the window went away while the frame was presenting.
See mln_map_attach_android_surface in the C API reference.
Errors:
Status.INVALID_ARGUMENTwhensurfacehas no window, such as after the platform destroyed it.Status.UNSUPPORTEDwhen you createddevicewithoutVulkanDeviceOptions.presentation.Status.UNSUPPORTEDwhen the GPU or the Vulkan loader can't present.Status.NATIVE_ERRORwhen the library can't create the graphics context or the window's surface.